// Copyright 2017 The Kubernetes Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

@import '../../../variables';

kd-resource-card-header-column {
  align-items: center;
  display: flex;
  flex-basis: auto;
  flex-grow: 1;
  min-width: $baseline-grid * 10;
  overflow: hidden;
  padding-left: 2 * $baseline-grid;

  &:first-child {
    padding-left: $baseline-grid;
  }
}

.kd-resource-card-header-column-container {
  align-items: center;
  display: flex;
}

.kd-resource-card-header-column-sortable {
  // Cascade on hover state to all children excepted the ones that have
  // kd-resource-card-header-column-sorted class applied already
  &:hover {
    &:not(.kd-resource-card-header-column-sorted) {
      * {
        color: $foreground-1;
      }
    }
  }

  md-icon {
    &:not(.kd-resource-card-header-column-sorted) {
      color: $foreground-3;
    }
  }

  * {
    cursor: pointer;
    outline: none;
  }
}

.kd-resource-card-header-column-sorted {
  color: $foreground-1;
  font-weight: $bold-font-weight;
}

.kd-resource-card-header-sort-column-icon-container {
  display: flex;
  flex-direction: column;
}

.kd-resource-card-header-sort-column-icon-asc {
  margin-bottom: -2 * $baseline-grid;
}
